package ysq.xyg.shop.model.po;

import lombok.NoArgsConstructor;

import lombok.Data;
import ysq.xyg.base.util.BaseConstant;
import ysq.xyg.base.util.BaseUtil;
import ysq.xyg.sys.model.po.SysUser;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * 商城模块-提现表实体类
 *
 * @author congcong tao
 * @date 2019-4-28 11:19:58
 */
@Data
@NoArgsConstructor
@Table(name = "xyg_shop_withdraw")
public class ShopWithdraw implements Serializable{

	/**
     * 主键
     */ 
	@Id
	private String id;
	
	/**
     * 会员
     */ 
	@Column(name = "member_id")
	private String memberId;
	
	/**
     * 金额
     */ 
	@Column(name = "money")
	private String money;
	
	/**
     * 支付宝号
     */ 
	@Column(name = "alipay")
	private String alipay;
	
	/**
     * 银行卡号
     */ 
	@Column(name = "bank_card")
	private String bankCard;
	
	/**
     * 状态1、待处理，2、已处理
     */ 
	@Column(name = "status")
	private String status;
	
	/**
     * 状态1、打款成功，2、打款失败
     */ 
	@Column(name = "manage_status")
	private String manageStatus;
	
	/**
     * 描述
     */ 
	@Column(name = "description")
	private String description;
	
	/**
     * 申请时间
     */ 
	@Column(name = "apply_time")
	private Date applyTime;
	
	/**
     * 处理时间
     */ 
	@Column(name = "manage_time")
	private Date manageTime;
	
	/**
     * 创建者
     */ 
	@Column(name = "create_user")
	private String createUser;
	
	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;
	
	/**
     * 删除状态1、未删除2、已删除
     */ 
	@Column(name = "remove_tag")
	private String removeTag;
	
	/**
     * 更新者
     */ 
	@Column(name = "update_user")
	private String updateUser;
	
	/**
     * 更新时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;

	@Transient
	private String memberNickName;

	@Transient
	private String memberName;

	@Transient
	private String memberPhone;

	public ShopWithdraw(SysUser sysUser) {
		this.id= BaseUtil.uId();
		this.removeTag= BaseConstant.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = sysUser.getId();
		this.updateTime = new Date();
		this.updateUser = sysUser.getId();
	}
}